package com.xinjiang.electricpower.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.xinjiang.electricpower.domain.DTO.WorkOrderEarlyWarningDTO;
import com.xinjiang.electricpower.domain.DTO.WorkOrderMonitorDTO;
import com.xinjiang.electricpower.domain.DTO.WorkOrderPoolDTO;
import com.xinjiang.electricpower.domain.XjOrderGeneral;
import com.xinjiang.electricpower.domain.vo.*;

import java.util.List;

/**
 * @author feizhao
 * @date 2022/11/21
 * @apiNote
 */
public interface IWorkOrderMonitorService extends IService<XjOrderGeneral> {
    /**
     * 统计当月的各个状态的工单数
     */
    List<WorkOrderStatisticsStatusVO> getNumsByStatus();

    /**
     * 统计指定年月的各个状态的工单数
     */
    List<WorkOrderStatisticsStatusVO> getNumsByStatus(WorkOrderPoolDTO workOrderPoolDTO);

    /**
     * 统计工单池-工单占比状态
     */
    List<WorkOrderStatisticsStatusVO> getNumsByStatusTest(WorkOrderPoolDTO workOrderPoolDTO);
    /**
     * 统计当月的各个系统的待办的工单数
     */
    List<SystemWorkOrderStatisticsStatusVO> getNumsBySystemWorkOrderStatus();

    /**
     * 查询工单监控列表
     *
     * @param page                分页对象
     * @param workOrderMonitorDTO 工单DTO类
     * @return PageInfo<WorkOrderMonitorVO> 返回分页的工单预警信息
     */
    PageInfo<WorkOrderMonitorVO> selectWorkOrderMonitorPage(PageDTO<WorkOrderMonitorVO> page, WorkOrderMonitorDTO workOrderMonitorDTO);

    /**
     * 查询预警工单列表无分页
     *
     * @param ids 批量id
     * @return List<WorkOrderMonitorVO> 返回预警工单列表
     */
    List<WorkOrderMonitorVO> selectWorkOrderMonitors(String... ids);

    /**
     * 查询工单监控无分页
     *
     * @param workOrderMonitorDTO 工单监控DTO类
     * @return List<WorkOrderMonitorVO> 返回工单监控列表
     */
    List<WorkOrderMonitorVO> selectWorkOrderMonitors(WorkOrderMonitorDTO workOrderMonitorDTO);
    /**
     *工单预警按照各个类型汇总待办工单
     * @return  List<WorkOrderPoolSummaryVO> 返回汇总数据
     */
    List<WorkOrderPoolSummaryVO> getXjOrderGeneralByStatus(WorkOrderEarlyWarningDTO workOrderEarlyWarningDTO);

    List<SystemOrdersVO> countSystemOrders(String status);
}
